package com.baizhi.chario;

import java.io.*;

public class InputStreamReaderDemo {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("F:\\a.txt");
        InputStreamReader isr = new InputStreamReader(fis,"UTF-8"); // 按照指定字符集将字节转换成字符

        int d;
        while((d=isr.read())!=-1){
            System.out.println((char)d);
        }

        isr.close();
    }
}
